import { ApiProperty } from "@nestjs/swagger";
import { IsInt, IsString, Length } from "class-validator";

export class CreateSurveyDto {
    @ApiProperty({
      description: '标题',
      example: '趣味问答',
    })
    @IsString()
    @Length(1, 255)
    title: string;
  
    @ApiProperty({
      description: '题目',
      example: '1,2,3',
    })
    @IsString()
    @Length(1, 255)
    questionIds: string;
  
    @ApiProperty({
      description: '结果',
      example: '1,2,3',
    })
    @IsString()
    @Length(1, 255)
    resultIds: string;
  
    @ApiProperty({
      description: '已测人数',
      example: 100,
    })
    @IsInt()
    participantsCount: number;
  
    @ApiProperty({
      description: '缩略图',
      example: 'thumbnail.jpg',
    })
    @IsString()
    @Length(1, 255)
    thumbnail: string;
  
    @ApiProperty({
      description: '背景图',
      example: 'background.jpg',
    })
    @IsString()
    @Length(1, 255)
    background: string;
  }
  